{% extends "@!SonataAdmin/standard_layout.html.twig" %}

{% block sonata_head_title %}
    Symfony Admin | Log in
{% endblock %}

{% block body_attributes %}
    class="hold-transition login-page"
{% endblock %}

{% block sonata_header %}

{% endblock %}

{% block sonata_wrapper %}
    <div class="login-box">
        <div class="login-logo">
            <a href="#"><b>Symfony</b> Admin</a>
        </div>
        <div class="login-box-body">
            <p class="login-box-msg">经营原创 - 经营艺术</p>
            <form method="post">
                {% if error %}
                    <div class="alert alert-danger" style="padding: 10px">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
                {% endif %}
                {% if app.user %}
                    <div class="mb-3">
                        You are logged in as {{ app.user.username }}, <a href="{{ path('app_logout') }}">Logout</a>
                    </div>
                {% endif %}
                <div class="form-group has-feedback">
                    <input type="text" value="{{ last_username }}" name="username" placeholder="用户名" id="inputUsername" class="form-control" required autofocus>
                    <span class="glyphicon glyphicon-user form-control-feedback"></span>
                </div>
                <div class="form-group has-feedback">
                    <input type="password" name="password" id="inputPassword" placeholder="密码" class="form-control" required>
                    <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                </div>
                <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
                <div class="row">
                    {# Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.#}
                    {# See https://symfony.com/doc/current/security/remember_me.html#}
                    <div class="col-xs-8">
                        <div class="checkbox icheck">
                            <label style="margin-left: 0px;">
                                <input type="checkbox" name="_remember_me"> 记住我
                            </label>
                        </div>
                    </div>
                    <div class="col-xs-4">
                        <button type="submit" class="btn btn-primary btn-block btn-flat">登 录</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
{% endblock %}
